package set;

import tree.BST;

/**
 * @author linzou@linkdoc.com
 * @ClassName: BSTSet
 * @Description:
 * @date 2019/2/18 9:42 PM
 */
public class BSTSet<E extends Comparable<E>> implements Set<E> {

    private BST<E> bst;

    public BSTSet(){
        this.bst = new BST<>();
    }

    @Override
    public void add(E e) {
        this.add(e);
    }

    @Override
    public void remove(E e) {
        this.bst.remove(e);
    }

    @Override
    public boolean contains(E e) {
        return this.contains(e);
    }

    @Override
    public int getSize() {
        return this.bst.size();
    }

    @Override
    public boolean isEmpty() {
        return this.bst.isEmpty();
    }
}
